package com.quectel.core.module.grid.dto;

import com.quectel.core.module.really.dto.ReallyCompanyDto;
import com.quectel.core.module.village.dto.VillageBuildingDto;
import com.quectel.core.module.village.dto.VillageDto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @author bob
 * @email bob.yu@quectel.com
 * @date 2023/02/03 15:45
 */
@Data
@Schema
public class GridDto implements Serializable {

    /**
     * 主键
     */
    @Schema(description = "主键")
    private Long id;

    /**
     * 租户id
     */
    @Schema(description = "租户id")
    private Long tenantId;

    /**
     * 小区id
     */
    @Schema(description = "小区id")
    private Long villageId;

    /**
     * 网格名称
     */
    @Schema(description = "网格名称")
    private String name;

    @Schema(description = "特殊字段")
    private String extraAttr;

    /**
     *
     */
    @Schema(description = "")
    private String creator;

    /**
     *
     */
    @Schema(description = "")
    private Date createTime;

    /**
     *
     */
    @Schema(description = "")
    private String editor;

    /**
     *
     */
    @Schema(description = "")
    private Date editTime;

    /************非数据库字段 start ************/
    @Schema(description = "小区对象")
    private VillageDto village;

    @Schema(description = "楼栋列表")
    private List<VillageBuildingDto> buildingList;

    @Schema(description = "实有单位列表")
    private List<ReallyCompanyDto> companyList;

    @Schema(description = "智能事件数量")
    private Integer eventCount;

    @Schema(description = "已绑定智能事件种类列表")
    private List<GridEventDiscoveryBindingDto> bindCategory;

    @Schema(description = "扩展字段")
    private VillageDto.ExtraAttrCls extraAttrCls;

    @Schema(description = "绘图区域的中心点")
    private double[] centerPoint;

    @Schema(description = "网格员人数")
    private Integer gridMemberNum;

    /************非数据库字段 end **************/


    @Data
    @Schema
    public static class ExtraAttrCls implements Serializable {

        @Schema(description = "地图边界")
        private String polygonPath;
    }
}
